package org.holynite.fieldmanage.entities

import javax.persistence.EmbeddedId
import javax.persistence.Entity
import javax.persistence.Table

/**
 * Created by midnite on 15/1/14.
 */
@Entity
@Table(name = "field_charge_scheme")
class FieldScheme implements Serializable {
	@EmbeddedId
	FieldSchemePK fspkey

	boolean equals(o) {
		if (this.is(o)) return true
		if (getClass() != o.class) return false

		FieldScheme that = (FieldScheme) o

		if (fspkey != that.fspkey) return false

		return true
	}

	int hashCode() {
		return (fspkey != null ? fspkey.hashCode() : 0)
	}
}
